<?php

namespace App\Models;

use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class News extends Model
{

    use DataFormat;

    protected $table = 'news';
    protected $dates = [''];

    protected $guarded = ['id', 'created_at'];
    protected $fillable = [
        'org_id',
        'platform_id',
        'title',
        'photo',
        'content',
        'is_recommend',
        'status',
        'publish_time',
    ];

    public function org() {
        return $this->belongsTo('App\Models\Org', 'org_id', 'id');
    }

}
